<%--
  Created by IntelliJ IDEA.
  User: Administrator
  Date: 2024/11/7
  Time: 15:26
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<html>
<head>
    <title>Title</title>
</head>
<body>
<center>
    <table border="1" cellspacing="0" width="1400" bgcolor="#faebd7">
        <tr style="text-align: center;">
            <th style="width: 100px">编号</th>
            <th style="width: 50px">姓名</th>
            <th style="width: 130px">用户名</th>
            <th style="width: 150px">密码</th>
            <th style="width: 500px">照片</th>
            <th style="width: 80px">身份</th>
        </tr>
        <c:forEach var="item" items="${pageInfo.list}">
            <tr style="text-align: center;">
                <td>${item.id}</td>
                <td>${item.name}</td>
                <td>${item.username}</td>
                <td>${item.password}</td>
                <td><img src="${pageContext.request.contextPath}/img/${item.avatar}"
                         height="125px"></td>
                <c:if test="${item.sf}==0">
                    <td>员工</td>
                </c:if>
                <c:if test="${item.sf}==1">
                    <td>经理</td>
                </c:if>
            </tr>
        </c:forEach>
    </table>
    当前为第${pageInfo.pageNum}页/共${pageInfo.pages}页 共${pageInfo.total}条数据<br/>
    <a href="${pageContext.request.contextPath}/user/page.do?pageNum=${pageInfo.firstPage}">首页</a>
    <c:if test="${pageInfo.hasPreviousPage}">
        <a href="${pageContext.request.contextPath}/user/page.do?pageNum=${pageInfo.prePage}">上一页</a>
    </c:if>
    <c:if test="${pageInfo.hasNextPage}">
        <a href="${pageContext.request.contextPath}/user/page.do?pageNum=${pageInfo.nextPage}">下一页</a>
    </c:if>
    <a href="${pageContext.request.contextPath}/user/page.do?pageNum=${pageInfo.pages}">尾页</a>
</center>
</body>
</html>